package com.muyu.file.controller;

import com.muyu.file.service.ConvertBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 图片转成Base64 ConvertBase
 *
 * @author LeYang
 * on 2025/3/17
 */
@RestController
@RequestMapping("/convert")
public class ConvertBase {

    @Autowired
    private ConvertBaseService convertBaseService;

    @RequestMapping("/base64")
    public String base64(@RequestParam("file") MultipartFile multipartFile) {
        return convertBaseService.base64(multipartFile);
    }

}
